﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using FluentNHibernate;

namespace Mindfor.Web.Data.Mappings
{
	public class MailTemplateMap : ClassMap<MailTemplate>
	{
		public MailTemplateMap()
		{
			Table("MailTemplates");
			Id(m => m.Id);
			Map(m => m.Subject).Length(255).Not.Nullable();
			Map(m => m.Body);
			Map(m => m.IsBodyHtml);

			References<MailTemplateType>(m => m.Type, "MailTemplateTypeId");
			References<Language>(m => m.Language, "LanguageId");
		}
	}
}
